// 实现一个run
function run(fn) {
    let gen = fn();
    function _next(data) {
        const { value, done } = gen.next(data)
        if (done) return value
        if (value.then) {
            value.then(res => _next(res))
        } else {
            _next(value)
        }
    }
    _next()
}